package com.zkw.ss.filter;

import javax.servlet.*;
import java.io.IOException;

/**
 * Created by Administrator on 2016/5/3 0003.
 */
public class LogFilter implements Filter {
    public void init(FilterConfig filterConfig) throws ServletException {
        System.out.println("init log filter!");
    }

    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("before the log filter!");
        filterChain.doFilter(servletRequest,servletResponse);
        System.out.println("after the log filter!");
    }

    public void destroy() {
        System.out.println("destroy the log filter!");
    }
}
